<?xml version="1.0"?>

<f:view
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:liferay-ui="http://portletfaces.org/liferayfaces/liferay-ui"
	xmlns:liferay-util="http://portletfaces.org/liferayfaces/liferay-util"
	xmlns:ui="http://java.sun.com/jsf/facelets"
>
	<h:head />
	<h:body>
		<ice:form id="reservas">
			<ice:panelGrid style="margin: 10px 10px 10px 5px;" rendered="#{reservasBean.errorMessage != null}">
				<ice:outputText id="errorMessage" value="#{reservasBean.errorMessage}" styleClass="#{reservasBean.estilo}"/>
			</ice:panelGrid>
			<ice:panelGrid columns="4" columnClasses="column1,column2,column1,column4">
				<ice:outputText id="name" value="#{i18n['name']}"/>
				<ice:inputText id="nameIn" value="#{reservasBean.name}" size="50" maxlength="40"/>
				<ice:outputText id="passname" value="#{i18n['surname']}"/>
				<ice:inputText id="passnameIn" value="#{reservasBean.passname}" size="50" maxlength="50"/>
				<ice:outputText id="telefono" value="#{i18n['telefono']}"/>
				<ice:inputText id="telefonoIn" value="#{reservasBean.telefono}" size="50" maxlength="15" />
				<ice:outputText id="email" value="#{i18n['email']}"/>
				<ice:inputText id="emailIn" value="#{reservasBean.email}" size="50" maxlength="50"/>
				<ice:outputText id="date" value="#{i18n['date']}"/>
				<ice:selectInputDate id="dateIn" value="#{reservasBean.date}" 
							renderAsPopup="true" 
							renderMonthAsDropdown="false" 
							renderYearAsDropdown="false">
					<f:convertDateTime locale="#{reservasBean.locale}" pattern="#{reservasBean.pattern}" type="date"/>
				</ice:selectInputDate>
				<ice:outputText id="personas" value="#{i18n['personas']}"/>
				<ice:inputText id="personasIn" value="#{reservasBean.personas}" size="50" maxlength="50"/>
			</ice:panelGrid>
			<br/>
			<ice:panelGrid columns="2" columnClasses="column1,column3">
				<ice:outputText id="text" value="#{i18n['content']}"/>
				<ice:inputTextarea id="textIn" value="#{reservasBean.content}" cols="100" rows="10" maxlength="1000" style="width: 82%;" />
			</ice:panelGrid>
			<br/>
				<ice:selectBooleanCheckbox id="checkCondiciones" value="#{reservasBean.acept}" style="margin-left: 5px;"/>
				<ice:outputText id="condicionesUso" value="#{i18n['condiciones']}" style="padding-left: 5px;"/>
				<a id="linkCondiciones" href="#{reservasBean.condiciones}" target="_blank" style="padding-left: 5px;">#{i18n['leer']}</a> 
			<br/>
				<ice:selectBooleanCheckbox id="checkMailing" value="#{reservasBean.mailing}" style="margin-left: 5px;"/>
				<ice:outputText id="mailing" value="#{i18n['mailing']}" style="padding-left: 5px;"/>
			<br/><br/>
			<ice:commandButton id="submit" value="#{i18n['send']}" action="#{reservasBean.enviar()}" style="margin-left: 5px;">
				<f:ajax render="@form" />
			</ice:commandButton>
			<ice:commandButton id="cancel" value="#{i18n['cancel']}" action="#{reservasBean.cancel()}" style="margin-left: 5px;">
				<f:ajax render="@form" />
			</ice:commandButton>
		</ice:form>
	</h:body>
</f:view>